{extend name='main'}

{block name="button"}
<!-- <button data-open='{:url("job_add")}' data-title="添加用户" class='layui-btn layui-btn-sm layui-btn-primary'>添加兼职</button> -->
<style type="text/css">
  .layui-btn {
    display: block;
    margin: 10px;
}
</style>
{/block}

{block name="content"}
<div class="think-box-shadow">
    {include file='job/index_search'}
    <table class="layui-table margin-top-10" lay-skin="line">

        <thead>
        <tr>
          <th>兼职ID</th>
          <th>标题</th>
          <th>浏览量</th>
          <th>所属地区</th>
          <th>兼职类型</th>
          <th>所需人数</th>
          <th>报名人数</th>
          <th>薪资</th>
          <th>结算方式</th>
          <th>发布时间</th>
          <th>是否置顶</th>
          <th>是否推荐</th>
          <th>来源</th>
          <th>发布人</th>
          <th>联系电话</th>
          <th >操作</th>
        </tr>
        </thead>

        <tbody>
        {foreach $list as $key=>$vo}
        <tr >
        <td>{$vo.id}</td>
        <td>{$vo.title}</td>
        <td>{$vo.click_num}</td>
        <td width="100px;">{$vo.province}&nbsp;{$vo.city}</td>
        <td>{$vo.cate.name|default='--'}</td>
        <td>{$vo.need_worker}</td>
        <td>{$vo.had_worker}</td>
        <td>{$vo.salary}{$vo.salary_unitCh}</td>
        <td>{$vo.settlement_typeCh}</td>
        <td>{$vo.add_time}</td>
        <td>{eq name='vo.is_top' value='0'}<span class="layui-badge">否</span>{else}<span class="layui-badge layui-bg-green">是</span>{/eq}</td>
        <td>{eq name='vo.is_recommend' value='0'}<span class="layui-badge">否</span>{else}<span class="layui-badge layui-bg-green">是</span>{/eq}</td>
        <td>{eq name="vo.admin_id" value='0'}前端{else/}平台{/eq}</td>
        <td>{$vo.contacts}</td>

        <td> {$vo.mobile} </td>
        <td >
          {if auth("admin/job/editJob")}
            <a data-dbclick class="layui-btn layui-btn-sm" data-title="兼职详情" data-open='{:url("editJob")}?id={$vo.id}'>兼职详情</a>
          {/if}
          {if auth("admin/job/apply")}
            <a data-dbclick class="layui-btn layui-btn-sm" data-title="{$vo.id}-{$vo.title}-报名列表" data-modal='{:url("apply")}?id={$vo.id}'>报名列表</a>
          {/if}
          {if auth("admin/job/export")}
             <a data-dbclick class="layui-btn layui-btn-sm" data-title="{$vo.id}-{$vo.title}-报名列表" href="{:url("export")}?id={$vo.id}">导出报名</a>
          {/if}
        </td>
        </tr>
        {/foreach}
        </tbody>
    </table>

    {empty name='list'}<span class="notdata">没有记录哦</span>{else}{$pagehtml|raw|default=''}{/empty}

</div>

{/block}
